package com.mzx.javase.yichang;

/**
 * @Description:自定义异常
 * @Date: 2022/3/1 9:29
 * @Author: MarKing
 */
public class myException extends Exception{
    /**
     * 如何自定义一个异常？
     *  首先定义自己类，去继承Exception类或其子类，重写其中的方法(有参无参构造方法、String message的构造方法)
     *
     */
    public myException(String message) {
        super(message);
    }

    public myException(String message, Throwable cause) {
        super(message, cause);
    }

    public myException(Throwable cause) {
        super(cause);
    }

    public myException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }

    public myException() {
    }
}
